import { defineConfig } from 'vitepress'
// import { set_sidebar } from "../utils/auto_siderbar.mjs"
// https://vitepress.dev/reference/site-config
export default defineConfig({
  title: 'zy-文档项目', //标题
  description: 'A VitePress Site',
  themeConfig: {
    outline: [2, 6],
    outlineTitle: '目录',
    // logo:'',
    // 路由
    nav: [
      {
        text: '前端',
        items: [
          {
            text: 'CSS',
            link: '/',
          },
        ],
      },
      { text: '示例', link: '/docList/markdown-examples' },
      { text: '首页', link: '/' },
    ],

    // sidebar: [
    //   {
    //     text: 'Examples-1',
    //     items: [
    //       { text: 'Markdown 演示', link: '' },
    //       { text: 'Runtime API  演示', link: '' },
    //     ],
    //   },
    // ],
    // sidebar: {
    //   '/docList/works': set_sidebar('/docList/works'),
    // },
    sidebar: false,
    aside: 'left',
    //其他站点
    socialLinks: [{ icon: 'github', link: 'https://github.com/vuejs/vitepress' }],
    // 设置搜索框的样式
    search: {
      provider: 'local',
      options: {
        translations: {
          button: {
            buttonText: '搜索文档',
            buttonAriaLabel: '搜索文档',
          },
          modal: {
            noResultsText: '无法找到相关结果',
            resetButtonTitle: '清除查询条件',
            footer: {
              selectText: '选择',
              navigateText: '切换',
            },
          },
        },
      },
    },
    footer: {
      //底部
      copyright: 'Copyright© 2023 Albert Zhang',
    },
  },
})
